<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>Saiku - Next Generation Open Source Analytics</title>
        
        <!--[if lt IE 9]><script type="text/javascript" src="js/svgweb/svg.js" data-path="js/svgweb/"></script><![endif]-->
        <meta name="svg.render.forceflash" content="true">
        
        <!-- Blueprint CSS -->
        <link rel="stylesheet" href="css/blueprint/src/reset.css" type="text/css" media="screen, projection">
        <link rel="stylesheet" href="css/blueprint/src/typography.css" type="text/css" media="screen, projection">
        <link rel="stylesheet" href="css/blueprint/src/forms.css" type="text/css" media="screen, projection">
        <!--[if lt IE 8]><link rel="stylesheet" href="css/blueprint/src/ie.css" type="text/css" media="screen, projection"><![endif]-->
        
        <!--  jQuery CSS -->
        <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/smoothness/jquery-ui.css" type="text/css" media="all" />
        
        <link rel="stylesheet" href="js/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />

        <!-- Saiku CSS -->
        <link rel="stylesheet" href="css/saiku/src/styles.css" type="text/css">
        <link rel="shortcut icon" href="favicon.ico">
        </head>
    <body>
        <div id="header" class="hide"></div>
        
        <div class="processing_container"></div>
        <div class="processing">
            <div class="processing_inner">
                <span class="processing_image">&nbsp;</span>
                <span class="processing_message">Loading...</span>
            </div>
        </div>
        
        
        <!--  jQuery, jQuery UI -->
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
        <script>typeof(window.jQuery) !== "undefined" || document.write('<script src="js/jquery/jquery.min.js"><\/script>')</script>
        <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js" type="text/javascript"></script>
        <script src="js/jquery/jquery-ui.min.js"></script>
        
        <script src="js/jquery/jquery-mobile-touch.js"></script>

    
        <script type="text/javascript" src="js/fancybox/jquery.fancybox-1.3.4.pack.js"></script>

        <!-- Backbone.js and deps -->
        <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.1.7/underscore-min.js"></script>
        <script>typeof(_) !== "undefined" || document.write('<script src="js/backbone/underscore.js"><\/script>')</script>
        <script type="text/javascript" src="js/backbone/json2.js"></script>
        <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/backbone.js/0.5.3/backbone-min.js"></script>
        <script>typeof(Backbone) !== "undefined" || document.write('<script src="js/backbone/backbone.js"><\/script>')</script>
        
        <!-- Loggly error logging service -->
        <script type="text/javascript" src="js/logger/janky.post.min.js"></script>
        <script type="text/javascript" src="js/logger/Logger.js" defer></script>

        <!-- Saiku Project -->
        <script type="text/javascript" src="js/saiku/Settings.js"></script>
        <script type="text/javascript" src="js/saiku/models/Dimension.js"></script>
        <script type="text/javascript" src="js/saiku/views/DimensionList.js"></script>
        <script type="text/javascript" src="js/saiku/views/Toolbar.js"></script>
        <script type="text/javascript" src="js/saiku/views/Modal.js"></script>
        <script type="text/javascript" src="js/saiku/views/MDXModal.js"></script>
        <script type="text/javascript" src="js/saiku/views/SelectionsModal.js"></script>
        <script type="text/javascript" src="js/saiku/views/DrillthroughModal.js"></script>
        <script type="text/javascript" src="js/saiku/views/LoginForm.js"></script>
        <script type="text/javascript" src="js/saiku/views/AboutModal.js"></script>
        <script type="text/javascript" src="js/saiku/views/WorkspaceToolbar.js"></script>
        <script type="text/javascript" src="js/saiku/views/WorkspaceDropZone.js"></script>
        <script type="text/javascript" src="js/saiku/views/Table.js"></script>
        <script type="text/javascript" src="js/saiku/views/Workspace.js"></script>
        <script type="text/javascript" src="js/saiku/views/DeleteQuery.js"></script>
        <script type="text/javascript" src="js/saiku/views/OpenQuery.js"></script>
        <script type="text/javascript" src="js/saiku/views/SaveQuery.js"></script>
        <script type="text/javascript" src="js/saiku/views/Tab.js"></script>
        <script type="text/javascript" src="js/saiku/models/Repository.js"></script>
        <script type="text/javascript" src="js/saiku/models/Properties.js"></script>
        <script type="text/javascript" src="js/saiku/models/Result.js"></script>
        <script type="text/javascript" src="js/saiku/models/QueryAction.js"></script>
        <script type="text/javascript" src="js/saiku/models/QueryScenario.js"></script>
        <script type="text/javascript" src="js/saiku/models/Query.js"></script>
        <script type="text/javascript" src="js/saiku/models/Session.js"></script>
        <script type="text/javascript" src="js/saiku/models/SessionWorkspace.js"></script>
        <script type="text/javascript" src="js/saiku/models/Member.js"></script>
        <script type="text/javascript" src="js/saiku/Saiku.js"></script>
        <script type="text/javascript" src="js/saiku/adapters/SaikuServer.js"></script>
        <script type="text/javascript" src="js/saiku/routers/QueryRouter.js"></script>
                
        <!-- Saiku plugins -->
        <script type="text/javascript" src="js/saiku/plugins/Chart/plugin.js" defer></script>
        <script type="text/javascript" src="js/saiku/plugins/Statistics/plugin.js" defer></script>
        <script type="text/javascript" src="js/saiku/plugins/I18n/plugin.js" defer></script>
        <script type="text/javascript" src="js/saiku/plugins/BIServer/plugin.js" defer></script>
        <script type="text/javascript" src="js/saiku/plugins/Buckets/plugin.js" defer></script>
        
        <!-- Templates -->
        <script type="text/x-jquery-tmpl" id="template-cubes">
            <select class="cubes">
                <option value="">Select a cube</option>
                <% _.each(connections, function(connection) { %>
                    <% _.each(connection.catalogs, function(catalog) { %>
                        <% _.each(catalog.schemas, function(schema) { %>
                            <optgroup label="<%= ( schema.name != "" ? schema.name : catalog.name) +'  (' + connection.name + ')' %>">
                            <% _.each(schema.cubes, function(cube) { %>
                                <option value="<%= connection.name %>/<%= catalog.name %>/<%=  ((schema.name == '' || schema.name == null) ? 'null' : schema.name)  %>/<%= encodeURIComponent(cube.name) %>"><%= cube.name %></option>
                            <% }); %>
                            </optgroup>
                        <% }); %>
                    <% }); %>
                <% }); %>
            </select>
        </script>

        <script type="text/x-jquery-tmpl" id="template-dimensions">
        <ul>
        <% _.each(dimensions, function(dimension) { %>
        <% if (dimension.name != 'Measures') { %>
            <li class='parent_dimension'>
                <span class="root collapsed sprite"></span>
                <a class="folder_collapsed sprite" href="#" title="<%= dimension.description ? dimension.description : dimension.caption %>"><%= dimension.caption %></a>
                
                <ul>
                <% _.each(dimension.hierarchies, function(hierarchy) { %>
                    <% if (dimension.hierarchies.length > 1) { %>
                        <li class="hierarchy hide">
                            <a class="dimension" href="#"><%= hierarchy.caption %></a>
                        </li>
                    <% } %>
                    <% _.each(hierarchy.levels, function(level) { %>
                        <li class="hide"><a title="<%= level.uniqueName %>" rel="<%= level.uniqueName %>" 
                            class="dimension" href="#<%= dimension.name %>/hierarchy/<%= hierarchy.uniqueName %>/<%= level.uniqueName %>"><%= level.caption %></a>
                        </li>
                    <% }); %>
                <% }); %>
                </ul>
        <% } %>
        <% }); %>
        </ul>
        </script>
        
        <script type="text/x-jquery-tmpl" id="template-measures">
        <ul>
            <li>
                <span class="root expand sprite"></span>
                   <a href="#" title="Measures" class="folder_expand sprite">Measures</a>
                
                <ul>
                <% _.each(measures, function(measure) { %>
                    <li><a title="<%= measure.description ? measure.description : measure.uniqueName %>"
                            rel="<%= measure.uniqueName %>"
                        class="measure" href="#Measures/member/<%= measure.uniqueName %>"><%= measure.caption %></a>
                    </li>
                <% }); %>
                </ul>
            </li>
        </ul>
        </script>
        
        <script type="text/x-jquery-tmpl" id="template-workspace">
        <div class="workspace">
            <div class="workspace_inner">
                <div class="workspace_toolbar"></div>
                <div class="workspace_editor">
                    <textarea class="hide mdx_input" style="height:120px;" />
                </div>
                <div class="workspace_results">
                </div>
            </div>
        </div>

        <div class="sidebar">
            <div>
                <h3 class="top i18n">Cubes</h3>
                <div class="refresh_cubes_nav">
                    <a href="#refresh_cubes" 
                        class="i18n button refresh_cubes"  
                        title="Refresh Cubes (Clear Cache)"></a>
                </div>
            </div>
            <div class="sidebar_inner">
                <%= cube_navigation %>
            </div>
            <h3 class="i18n">Dimensions</h3>
            <div class="sidebar_inner dimension_tree"></div>
            <h3 class="i18n">Measures</h3>
            <div class="sidebar_inner measure_tree"></div>
        </div>
        
        <div class="sidebar_separator"></div>
        <div class="clear"></div>
        </script>

        <script type="text/x-jquery-tmpl" id="template-workspace-dropzones">
        <div class="workspace_fields">
            <div class="fields_list" title="COLUMNS">
                <div class="fields_list_header i18n">Columns</div>
                <div class="fields_list_body columns">
                    <ul class="connectable"></ul>
                </div>
                <div class="clear"></div>
            </div>
            <div class="fields_list" title="ROWS">
                <div class="fields_list_header i18n">Rows</div>
                <div class="fields_list_body rows">
                    <ul class="connectable">
                    </ul>
                </div>
                <div class="clear"></div>
            </div>
            <div class="fields_list" title="FILTER">
                <div class="fields_list_header i18n">Filter</div>
                <div class="fields_list_body filter">
                    <ul class="connectable">
                    </ul>
                </div>
                <div class="clear"></div>
            </div>
        </div>
        </script>
        
        <script type="text/x-jquery-tmpl" id="template-workspace-toolbar">
        <ul>
            <li><a href="#save_query" 
                class="i18n save button disabled_toolbar sprite" 
                title="Save query"></a></li>
            <li class="seperator"><a href="#run_query" 
                class="i18n run button disabled_toolbar sprite" 
                title="Run query"></a></li>
            <li><a href="#automatic_execution" 
                class="i18n auto button disabled_toolbar sprite" 
                title="Automatic execution"></a></li>
            <li><a href="#toggle_fields" 
                class="i18n toggle_fields button sprite"
                title="Toggle fields"></a></li>
            <li><a href="#toggle_sidebar" 
                class="i18n toggle_sidebar button sprite" 
                title="Toggle sidebar"></a></li>
            <li class="seperator"><a href="#non_empty" 
                class="i18n non_empty button disabled_toolbar sprite"  
                title="Non-empty"></a></li>
            <li><a href="#swap_axis" 
                class="i18n swap_axis button disabled_toolbar sprite" 
                title="Swap axis"></a></li>
            <li><a href="#show_mdx" 
                class="i18n mdx button disabled_toolbar sprite" 
                title="Show MDX"></a></li>
            <li class="seperator"><a href="#query_scenario" 
                class="i18n table_mode query_scenario button disabled_toolbar sprite" 
                title="Query Scenario"></a></li>
            <li class="seperator"><a href="#drillthrough" 
                class="i18n table_mode drillthrough button disabled_toolbar sprite" 
                title="Drill through on cell"></a></li>
            <li><a href="#export_drillthrough" 
                class="i18n table_mode drillthrough_export button disabled_toolbar sprite" 
                title="Export Drill-Through on cell to CSV"></a></li>
            <li class="seperator"><a href="#export_xls" 
                class="i18n export_xls button disabled_toolbar sprite" 
                title="Export XLS"></a></li>
            <li><a href="#export_csv" 
                class="i18n export_csv button disabled_toolbar sprite" 
                title="Export CSV"></a></li>
            <li><a href="#switch_to_mdx" 
                class="i18n switch_to_mdx button disabled_toolbar" 
                title="Switch to MDX Mode"></a></li>
        </ul>
        </script>
        
        <script type="text/x-jquery-tmpl" id="template-open-dialog">
        <div class="workspace">
            <div class="workspace_inner">
                <div class="workspace_toolbar hide">
                <ul>
                    <li><a href="#open_query" class="open button sprite"></a></li>
                    <li><a href="#delete_query" class="delete button sprite"></a></li>
                </ul>
                </div>
                <div class="workspace_results">
                </div>
            </div>
        </div>

        <div class="sidebar">
            <h3 class="top i18n">Queries</h3>
            <div class="sidebar_inner">
                <ul id="queries">
                    <li>Loading...</li>
                </ul>
            </div>
        </div>
        
        <div class="sidebar_separator"></div>
        <div class="clear"></div>
        </script>

        <script type="text/x-jquery-tmpl" id="template-selections">
            <div class="available_selections">
            <label for="filter_selections">Search: &nbsp;</label><input name="'filter_selections" id="filter_selections" type="text" class="filterbox" /> <br />
                Available members:<br/>
                <select multiple disabled>
                </select>
            </div>
            <div class="selection_buttons">
                <a class="form_button" href="#move_selection" id="add_members">&nbsp;&gt;&nbsp;</a><br><br>
                <a class="form_button" href="#move_selection" id="add_all_members">&gt;&gt;</a><br><br>
                <a class="form_button" href="#move_selection" id="remove_all_members">&lt;&lt;</a><br><br>
                <a class="form_button" href="#move_selection" id="remove_members">&nbsp;&lt;&nbsp;</a>
            </div>
            <div class="used_selections">
                Used members:<br/>
                <select multiple disabled></select>
            </div>
            <div class="options">
                <input name="show_unique" id="show_unique" type="checkbox" /><label for="show_unique">Show Unique Names</label>
            </div>
        </script>
        <script type="text/x-jquery-tmpl" id="template-drillthrough">
            <div class="row_limit">
                <br />
                Row Limit: (0 = none) <input id="maxrows" name="maxrows" class="maxrows" type="text" />
                <br />
                <b>CAUTION:</b> The number of rows can have a significant impact on the performance of the following action.
            </div>
        </script>
        <script type="text/x-jquery-tmpl" id="template-drillthrough-list">
        <div class="sidebar" style="border:1px solid #CCCCCC">
            <h3 class="i18n">Dimensions</h3>
            <div class="sidebar_inner dimension_tree"></div>
            <h3 class="i18n">Measures</h3>
            <div class="sidebar_inner measure_tree"></div>
        </div>
        
        <div class="sidebar_separator"></div>
        <div class="clear"></div>
        </script>
        <script type="text/x-jquery-tmpl" id="template-drillthrough-dimensions">
        <ul>
        <% _.each(dimensions, function(dimension) { %>
        <% if (dimension.name != 'Measures') { %>
            <li class='parent_dimension'>
                <span class="root collapsed sprite"></span>
                <input type="checkbox" class="check_dimension" />
                <a class="folder_collapsed sprite" href="#" title="<%= dimension.description ? dimension.description : dimension.caption %>"><%= dimension.caption %></a>
                
                <ul>
                <% _.each(dimension.hierarchies, function(hierarchy) { %>
                    <% if (dimension.hierarchies.length > 1) { %>
                        <li class="hierarchy hide">
                            <a class="dimension" href="#"><%= hierarchy.caption %></a>
                        </li>
                    <% } %>
                    <% _.each(hierarchy.levels, function(level) { %>
                        <% if (level.caption != "(All)") { %>
                            <li class="hide"> &nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="checkbox" class="check_level" value="<%= level.uniqueName %>"> <%= level.caption %></input>
                            </li>
                        <% } %>
                    <% }); %>
                <% }); %>
                </ul>
        <% } %>
        <% }); %>
        </ul>
        </script>
        
        <script type="text/x-jquery-tmpl" id="template-drillthrough-measures">
        <ul>
            <li>
                <span class="root expand sprite"></span>
                   <a href="#" title="Measures" class="folder_expand sprite">Measures</a>
                
                <ul>
                <% _.each(measures, function(measure) { %>
                    <li> &nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="checkbox" class="check_level" value="<%= measure.uniqueName %>"> <%= measure.caption %></input>
                            </li>
                <% }); %>
                </ul>
            </li>
        </ul>
        </script>
        <script type="text/javascript" src="js/ga.js"></script>
    </body>
</html>
